package com.igeekhome.wzgl.mapper;

import com.igeekhome.wzgl.entity.MaterialInboundEntity;
import com.igeekhome.wzgl.entity.MaterialOutboundEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface IMaterialOutboundMapper {
    @Select("select * from material_outbound")
    List<MaterialOutboundEntity> page();
    @Insert("insert into material_outbound(number,title,material_type,create_time,creater) values (#{number},#{title},#{materialType},#{createTime},#{creater})")
    int insert(MaterialOutboundEntity mo) ;
    @Delete("delete from material_outbound where id = #{id}")
    int delete(int id);
    @Update("update material_outbound set number=#{number},title=#{title},material_type=#{materialType},create_time=#{createTime},creater=#{creater} where id = #{id}")
    int update(MaterialOutboundEntity mo);
    @Select("select id,number,title,material_type,create_time,creater from material_outbound where id=#{id}")
    List<MaterialOutboundEntity> select(int id);
    @Select("select id,number,title,material_type,create_time,creater from material_inbound where id=#{id}")
    MaterialOutboundEntity getById(int id);
}
